//
//  WKDakaImageViewCell.m
//  V-Learn
//
//  Created by Apple on 2019/3/19.
//  Copyright © 2019 yxk. All rights reserved.
//

#import "WKDakaImageViewCell.h"

@implementation WKDakaImageViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])
    {
        [self setupUI];
    }
    return self;
}
+ (instancetype)cellWithTableView:(UITableView *)tableView
{
    static NSString *identifferCell = @"WKDakaImageViewCell";
    WKDakaImageViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifferCell];
    if (!cell) {
        cell = [[WKDakaImageViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifferCell];
        cell.selectionStyle = UITableViewCellSelectionStyleNone;
        
    }
    return cell;
}
- (void)setupUI{
    
    self.titleLab = [UILabel labelWithText:@"万思乐学小西妈双语工程万思乐学小西妈双语工程万思乐学小西妈双语工程万思乐学小西妈双语工程万思乐学小西妈双语工程" andTextColor:rgb(51,51,51) andName:nil andFontSize:14*kScaleFit];
    self.titleLab.numberOfLines = 0;
    [self.contentView addSubview:self.titleLab];
    [self.titleLab makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(15*kScaleFit);
        make.top.mas_equalTo(15*kScaleFit);
        make.right.mas_equalTo(-15*kScaleFit);
    }];
    
    
    self.detailLab = [UILabel labelWithText:@"主题课程二主题课程二级主题课程二级级" andTextColor:rgb(51,51,51) andName:nil andFontSize:14*kScaleFit];
    self.detailLab.numberOfLines = 0;
    [self.contentView addSubview:self.detailLab];
    [self.detailLab makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(15*kScaleFit);
        make.top.mas_equalTo(self.titleLab.mas_bottom).mas_equalTo(10);
        make.right.mas_equalTo(-15*kScaleFit);
        make.bottom.mas_equalTo(-10);
    }];
    
}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
- (void)setModel:(WKHotmenModel *)model{
    _model = model;
    self.titleLab.text = model.clockTitle;
    self.detailLab.text = model.clockOrtherTitle;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
